<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>初心-添加闲置物品</title>
		<meta name="description" content="" />
		<meta name="author" content="胡毅鹏" />
		<!--[if lt IE 9]>
			<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
		<link rel="shortcut icon" href="favicon.ico" />
        <link rel="stylesheet" href="{{ STATIC_URL }}css/reset.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="{{ STATIC_URL }}css/grid.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="{{ STATIC_URL }}css/master.css" type="text/css" media="screen" />
	</head>
	<body>
		<div>
			<header>
				<div class="container_12">
					<h1><a href="chuxin.html">初  心</a></h1>
					<nav id="mainNav" >
						<a href="chuxin.html">首页</a>
						<a href="#" class="selected">交易墙</a>
						<a href="#">图书库</a>
						<a href="#">讨论区</a>
					</nav>
					<form action="/search" method="">
						<input type="text" class="search-query" placeholder="搜索" />
					</form>
					<nav id="sideNav" class="gird_3" >
						<a href="#">胡太狼</a>
						<a href="#" >设置</a>
						<a href="#" >退出</a>
					</nav>
	
				</div>
			</header>
			<div class="container_12">
				<div class="grid_8 mainside">
					<div class="wallpanel">
			    		<div class="newhead">
			    			<h3>交易墙·添加闲置物品
			    				<a href="#" class="more">‹‹&nbsp;返回交易墙</a>
			    			</h3>
			    		</div>
			    		<div id="newdetail" class="detailcontent">
			    			<div id="rowtwo" >
			    				<div class="row">
			    					<label for="detailisbn">图书库相关图书已有：</label>
			    				</div>
                                {% if db %}
			    				<div class="subjectbox">
			    					<div class="subject">
			    						<div id="mainpic">
                                            <a href="{{ db.img }}" title="{{ db.title }}"><img src="{{ db.img }}" title="点击看大图" alt="{{ db.title }}"></a>
			    							<br>
			    							<p class="gact">
			    								<a href="#">更新封面（可暂不提供）</a>
			    							</p>
			    						</div>
			    						<div id="subjectinfo">
                                            <span style="font-size: 14px;"><a href="#">{{ db.title }}</a></span><br>
                                            {% if db.subtitle %}
                                            <span class="pl">副标题：</span>{{ db.subtitle }}<br>
                                            {% endif %}
                                            {% if db.author1 %}
                                            <span class="pl">作者：</span>{{ db.author1 }}<br>
                                            {% endif %}
                                            {% if db.publish %}
                                            <span class="pl">出版社：</span>{{ db.publish }}<br>
                                            {% endif %}
                                            {% if db.publish_time %}
                                            <span class="pl">出版时间：</span> {{ db.publish_time }}<br>
                                            {% endif %}
                                            {% if db.price %}
                                            <span class="pl">定价：</span>{{ db.price }}&nbsp;元<br>
                                            {% endif %}
                                            {% if db.isbn %}
                                            <span class="pl">ISBN：</span>{{ db.isbn }}<br>
                                            {% endif %}
			    						</div>
			    					</div>
                                    {% endif %}
   {% if book  %}
			    				<div class="subjectbox">
			    					<div class="subject">
			    						<div id="mainpic">
                                            {% if book.imglink_douban %}
                                            <a href="{{ book.imglink_douban }}" title="{{ book.name }}"><img src="{{ book.imglink_douban }}" title="点击看大图" alt="{{ book.name }}"></a>
                                            {% else %}
                                            {% if book.imglink_chuxin %}
                                            <a href="{{ book.imglink_chuxin }}" title="{{ book.name }}"><img src="{{ book.imglink_chuxin }}" title="点击看大图" alt="{{ book.name }}"></a>
                                            {% else %}
                                            <a href="{{ MEDIA_URL }}img/48.png" title="{{ book.name }}"><img src="{{ MEDIA_URL }}img/48.png" title="点击看大图" alt="{{ book.name }}"></a>
                                            {% endif %}
                                            {% endif %}
			    							<br>
			    							<p class="gact">
			    								<a href="#">更新封面（可暂不提供）</a>
			    							</p>
			    						</div>
			    						<div id="subjectinfo">
                                            <span style="font-size: 14px;"><a href="#">{{ book.name }}</a></span><br>
                                            {% if book.second %}
                                            <span class="pl">副标题：</span>{{ book.second }}<br>
                                            {% endif %}
                                            {% if book.author1 %}
                                            <span class="pl">作者：</span>{{ book.author1 }}<br>
                                            {% endif %}
                                            {% if book.publisher %}
                                            <span class="pl">出版社：</span>{{ book.publisher }}<br>
                                            {% endif %}
                                            {% if book.publish_time %}
                                            <span class="pl">出版时间：</span> {{ book.publish_time }}<br>
                                            {% endif %}
                                            {% if book.price %}
                                            <span class="pl">定价：</span>{{ book.price }}&nbsp;元<br>
                                            {% endif %}
                                            {% if book.isbn %}
                                            <span class="pl">ISBN：</span>{{ book.isbn }}<br>
                                            {% endif %}
			    						</div>
			    					</div>
                                    {% endif %}
			    					<div id="recentinfo">
                                        <a href="{% url new_book %}" class="btn-share">我也有这本书</a>
			    					</div>
			    					<div class="clearfix"></div>
								</div>
								
			    				<div class="row" style="border-top: 1px dashed #E2E2E2;padding-top: 10px;padding-bottom: 10px;"><label>如果与上述不符，可以继续：</label>
			    				   <a href="newbook2.html" class="btn-post" >下一步</a>
			    				</div>
			    			</div>
			    		</div>
			    	</div>
					
			    </div>
			    <div class="grid_4 sidebar">
			     	<div class="communityinfo">
			    		<p>你的某些物品是否还在某个角落睡觉呢？</p><br />
			    		<p>让它来初心吧，或许某个人正在寻找它...</p><br />
			    		<p>编辑信息时，不妨说明一下所在位置和心理价格。</p>
			    	</div>
			    </div>
			    <div class="clearfix" />
			</div>
			
			<footer class="container_12">
				<nav class="footinfo">
					<a href="#">关于</a>
					<span>·</span>
					<a href="#">联系</a>
					<span>·</span>
					<a href="#">反馈</a>
					<span>&copy;2012 chuxin.me</span>
				</nav>
			</footer>
		</div>
		
		<script src="http://lib.sinaapp.com/js/jquery/1.7/jquery.js" type="text/javascript"></script>
		<script src="js/jquery.validate.js" type="text/javascript"></script>
	    <script type="text/javascript">
	    $("#detailtype").change(function() {
				var checkValue = $("#detailtype").val();
	        if (checkValue == 0 ) { $("#rowone").hide(); $("#rowtwo").show(); }
	        else {$("#rowone").show(); $("#rowtwo").hide(); }
			}); 	

        
        function imgFilter(obj){
                if(/.*\.jpg$/.test($(obj).val()) || /.*\.png$/.test($(obj).val()) || /.*\.gif$/.test($(obj).val()) || /.*\.JPG$/.test($(obj).val()) || /.*\.PNG$/.test($(obj).val()) || /.*\.GIF$/.test($(obj).val()) || /.*\.jpeg$/.test($(obj).val()) || /.*\.JPEG$/.test($(obj).val()) || /.*\.bmp$/.test($(obj).val()) || /.*\.BMP$/.test($(obj).val())){
                }else{
                        alert("你只可以上传JPG、JPEG、GIF、PNG或BMP文件~");
                        $(obj).val("");
                        var _parent = $(obj).parent();
                        var _obj = $(obj).clone();
                        $(obj).remove();
                        _parent.append(_obj);
                        return false;
                }
        }
        	        
	    </script>
	</body>
</html>
